package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author 张永远
 * @since 2020-05-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_user")
public class UserDo extends Model<UserDo> {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 账号
     */
    @TableField("user_account")
    private String userAccount;

    /**
     * 用户名
     */
    @TableField("user_name")
    private String userName;

    /**
     * 密码
     */
    @TableField("user_password")
    private String userPassword;

    /**
     * 邮箱
     */
    @TableField("user_mail")
    private String userMail;

    /**
     * 电话
     */
    @TableField("user_phone")
    private String userPhone;

    /**
     * 用户状态 0未审核 1通过 2禁用
     */
    @TableField("user_status")
    private Integer userStatus;

    /**
     * 店铺id
     */
    @TableField("shop_id")
    private Long shopId;


    /**
     * 角色id
     */
    @TableField("role_id")
    private Long roleId;

    /**
     * 用户类型 1:代表客户 2：代表后台用户
     */
    @TableField("user_type")
    private Integer userType;
    /**
     * 登录类型 0:前台 2：后台
     */
    @TableField("user_role_type")
    private Integer userRoleType;
    /**
     * 仓库id
     */
    @TableField("storage_id")
    private Long storageId;

    /**
     * 头像  文件id
     */
    @TableField("head_file_id")
    private Long headFileId;

    /**
     * 公司id
     */
    @TableField("company_id")
    private Long companyId;

    @TableField("create_by")
    private Long createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("update_time")
    private Date updateTime;

    @TableField("delete_by")
    private Long deleteBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    /**
     * 是否绑定微信(0：未绑定 1：已绑定)
     */
    @TableField("is_binding")
    private Integer isBinding;

    @TableField("erp_user_id")
    private Long erpUserId;

    @TableField("last_login_time")
    private Date lastLoginTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
